CMAKE_MINIMUM_REQUIRED(VERSION 3.4.1)

INCLUDE(cmake/color.cmake)
INCLUDE(cmake/version.cmake)

EXTRACT_VERSION()

PROJECT(study VERSION ${PROJECT_VERSION} LANGUAGES CXX)
MESSAGE(STATUS "Build prject study: ${PROJECT_VERSION}")

ADD_COMPILE_OPTIONS(-Wall)

SET(CMAKE_CXX_STANDARD 11)
SET(EXECUTABLE_OUTPUT_PATH ${CMAKE_CURRENT_SOURCE_DIR}/bin)
SET(LIBRARY_OUTPUT_PATH ${CMAKE_CURRENT_SOURCE_DIR}/lib)

LINK_DIRECTORIES(
    ${CMAKE_CURRENT_SOURCE_DIR}/lib
)

ADD_SUBDIRECTORY(third/googletest-release-1.8.0)
ADD_SUBDIRECTORY(third/libevent-2.1.12-stable)

#ADD_SUBDIRECTORY(src/libmath)
ADD_SUBDIRECTORY(src/libmcls)

#ADD_SUBDIRECTORY(src/t-mingw)
#ADD_SUBDIRECTORY(src/t-dopc-hv)
#ADD_SUBDIRECTORY(src/t-condition)
#ADD_SUBDIRECTORY(src/t-msg)
#ADD_SUBDIRECTORY(src/t-plugin)
#ADD_SUBDIRECTORY(src/t-libevent)
#ADD_SUBDIRECTORY(src/autoload)
#ADD_SUBDIRECTORY(src/single-consume)
#ADD_SUBDIRECTORY(src/str)
#ADD_SUBDIRECTORY(src/realloc)
#ADD_SUBDIRECTORY(src/t1)
#ADD_SUBDIRECTORY(src/t2)
#ADD_SUBDIRECTORY(src/t3)
#ADD_SUBDIRECTORY(src/t4)
#ADD_SUBDIRECTORY(src/shm)
#ADD_SUBDIRECTORY(src/t_hv)
#ADD_SUBDIRECTORY(src/future)

ENABLE_TESTING()
ADD_SUBDIRECTORY(test)
